perm filename TODO[RDG,DBL]4 blob sn#552129 filedate 1980-12-17 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00006 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002		Questions
C00004 00003		Things yet to be done to RLL:
C00012 00004	Quickies:
C00015 00005	Units to Rename/Add/Delete
C00027 00006	[17 Dec]
C00039 ENDMK
C⊗;
	Questions
(Especially related to CORLL)
Dave: could we have several logically distinct KBs on one file?

 Description of KBs, at top level [logically distinct]
RLL - only the list of "stops", with essential ones extended.
USERS - list of users, and of classes of users - this KB always loaded in as well.
HEADERS - misc very high level things, which point to most of rest (basically this
	is set of units for classes.)
SLOTS - holds all the slots
	Things yet to be done to RLL:
updated [8 May 1980], [6 Apr 1980], started [8 Feb 1980]

?????
0. BIG CHANGE: The UNIT should know about the accessing, not the slot! Hence,
	associate with each KB (or unit?) the name of the accessing types -
	so change GetValue to RLLGetValue, and stick (Get . RLLGetValue) on each
	of current KBs (similiarly with Put, Add, ...)
	Note: to emulate Units, just put UA-GETVALUE there...

    In this way, we can solve Genesereth's & R H-R's complaints, ...
	and allow various schemes
	for indexing.
?????

1. Extend notion of Caching -- ie of a stored value.
  Slots are but one way.
  General spec for function:
	(Pre work)
	Look it up
	  If not found: Compute it
	(Post work)
  Examples: FunctionSpec
	(note it should be calculated by combining Defn, ... if ~∃ HighLevelDefn)
	    Slots for IExamples((AnyDog))
	    ? Descriptors?

2. Fix slots of AllExamples[AnyFormat] do the right thing. They are (I think)
  correct for FSet, FSingleton, FBag and FList; and and other SlotFormat
   FnForDeleting, FnForSubstituting, FnForAdding, FnForVerifyingAll, FnForKilling
  but not at all for those in AnyValueFormat.
	Also, many of these are inconsistent
  eg: FExecute - capable of using uUNIT and uSLOT, bound by FindDefault.
    	Will this get in trouble - ie with recursion?
	ANS: New why, with (ValueFor unit slot)

3. Is this how to handle Templates? - perhaps as descriptors, ala SPILL agendae
	- so can determine new task by fleshing out such descriptor.
	only here will it call that function [in FindDefault]

4. The way of handling functions [Processes] is NOT totally consistent. 
   Should have arglists,... Also some notion of how to check for what.
	New apply - should be: if ∃ n args, if n=1, then slot, n=2 => field,
		else just apply defn of first arg...
   Change from HowToProcess to LispFn
   Fix Processes, so its args can vary
	ie, use DomainType for each, with RangeType = "WhoCares"

5. Unit creation is a  unit list process - make it so. Give it a defn, whose
	rangetype is WhoCares!
		Using ApplyToEach ?
 Note: This KBupdates is also a UnitProcess -- make it so! 
	NOTE: for EuriskoProcesses, DomainType deduced from WhatToProcess

6. Production Rules - their formalism, and the like, needs to be resolved.
	Figure out more stuff for rules - eg store # of times tried, and success.
	More heuristics... (eg  AnyUnitCreationRule)

7. Write CommonHLDefn -- HighLevelDefn should be sufficient to define a slot!
  Note: Slot Combiners take 3-arguments
	First is list of slots,
	Second is list of argnames 
	Second is specifications -- eg TransitiveClosureCircular, Ordered, ...

8. FirstDefined -- new type of slot combiner - like McCarthy OR - when subslots
    	are disjoint.

9. Make sure each slot has a MakesSenseFor 
	- and improve final function to	confirm that for each...

10. More work with HighLevelDefn - so if F ≡ (SC f1 f2), then we can determine
	the HighLevelDefn of f1, if necessary

11. Figure what goes on FunctionCharacter
    
12. a) ToCache of AllTypicalExamples  - (*Do* SeeU&S +++ AllExamples)
on all units y s.t. y.Isa = (AnyX) [note must be a singleton.]
b) Caching - by storing AllIsas on AnyX, and putting (FSeeU&S AnyX SuperClass*),

13. Class of temporary units - eg instances of AnyFocusInstance - to be deleted
	(along with virtual slots) when KB is closed.
---------
Add in units for:
MyIsa, AnyIsa, ExistIsa, VariesWith, ...
Quickies:

Get rid of Agenda, fix Spill,

1) Finish IsParse? - used with GrammarType.

2) Finish up various facts about SlotCombiners.
Esp. FnFor?ing, which replaces UsingSlotCombiners, ...

3) New KB - LISPFN - this will house my description of various things which are
now lisp functions, especially
GetValue, ...
MapUnit, ...  [note this MAY require fixing I/OTypes - as union of ...]
DefaultGetValue, ...

4) Revert back from AnyRuleSpecFn to slot. Change Conjoining to ListOfParts
(that is, executable parts).  Fix IfParts, ThenParts to use this, NOT MySlots.

5) KRL like parser - for "a Moose with Antler = big, ..." (should be easy, using
just FNewUnit.)

6) Fix up OrderedPrototypes to be more efficient - so renames slot from Prototypes
to OrderedPrototpes, and note that defn of Prototypes can use that: in its defn.
Or jus make Prototypes never-cached! (as OrderedPrototypes had been.)

7) Figure out what to pass along to DefaultAfterPutValue - perhaps it should
be a history list, or the form ( ... (Slot1 Unit1 Add) (Slot0 Unit0 NewVal) ... ).
Maybe not.   Newer things toward the front.  This should subsume the hassle
now done for FunctionSpec.

Should this only be done for circular things? That is, cases like RangeType?
(so flag, associated with each slot, set to do these things.)
Units to Rename/Add/Delete

TypicalVirtualSlot → TypicalComputableSlot
TypicalPrimSlot	 →	TypicalPrimitiveSlot
ToInitialize	 →	ToInitializeValue ← InitializeSlot
ToCache		 →	ToCacheValue	← CacheValue
Exs		 →	Examples
HowToProcess	 →	LispFn
	fix FGet1Value, HLParser, Process
[Args to Process -dependent on ?]

Delete AnyCT&U, AnyAT&U, TypicalCT&U, TypicalAT&U - they are unnecessary!
(as really just dealing with composition).
[17 Dec]
 add on RangeInterpreter for UnrestrictedType
10) Find why specifying RangeType (when Format was NIL) erased both.
Some loop there.

11) Make AnyDatatype ⊂ AnyUnaryPredicate, and change slot names appropriately
Is Format ⊂ AnyCodeAl? No - but it is similar....

12) Use LASTPOS for REEVAL's starting position, rather than NIL.

13) Make sure each format's FnForXXXing returns its last argument (which is
now the modif) if successful. Hence forth that will be used!
(When verified that this works, change each DefaultXXXValue function, removing
the check.

14) Decide if ADDTOVAR works, or if this gets stuck on MARKEDASCHANGED...

15) On BQ* macro, fix so only (PROG ((g0012 (CAR sss)) ...) (RETURN (...)), rather
than use those SETQs

10. Use result of DefaultBeforePutValue - and make sure the verifiers return
    	such [this is modify...]
	Things done

16. Need a WhenFilled (Defn like IfNeeded) 
	[perhaps a ComputeWhenFilled, listing slots to be fixed up]
- this pushes some values along
	when a new value has been enterred...
	[This can do (1) recomputing Essential slots, and (2) determining value
	of slot X when slot Y has been changed.]
  Use this to rid self of FunctionSpec monstronsity, by always pushing values into
	slots, in all three cases. [Use CacheValue for one not explicitly requested,
	with why value explaining this.]
  Another solution: 
	FunctionSpec, when called, automatically caches Defn, DomainType and
	RangeType. So these slots don't both caching -- ie ∃ new slot,
	ToCacheValueFromElsewhere, which FunctionSpec calls.
	Note  Defn:ToCacheValue is AlreadyCached (which ≡ NoOp)
     (Should the slot-combiner know about this? How? 
	? (DoAlready (ApplyingFn CAR HighLevelDefn)) ?

[29 Nov]
Each of these - *P, OneOfThese, Predicate, ... should be units.
3) Use BACKQUOTE to advantage, to make more readible code

Rename from HLDefnParser to HLDefnExpander (and for Type)
	- fix FunctionSpec & VerifyArgs/VerifyValue
Defn of FunctionSpec - GetAccessFn => GetValue for last chance
	(worry of infinite loops...)

[21 Nov]
 Fast flag to UU-DIAGNOSE
 QUOTE?# => QUOTE? => BACKQUOTE
 UF-CANCELNETWORK takes a list
 UF-OPENNETWORK & UF-CLOSENETWORK  -- 2nd arg is fn to be executed
	[NIL defaults to earlier; T does nothing]
	-- 3rd arg : T means ReadOnly
   -- rewrite own UP-OPENNETWORK -

Twiddle AFTERSYSOUTFORMS, BEFORESYSOUTFORMS

Finally thought of them:
	Arg to pass to OverallStartUp, and WhenClosing - so not just name,
	put 2nd value, which that function can use.
	(This ?th argument to UF-OPENNETWORK/UF-WRITENETWORK)

[14 Sept]
1b) RELATED: ToInvalidate - associated with each slot, indicated what to do
	when this value is no longer relevant.

14. IgnoreCached - if given to GetValue, does not do UA-GETVALUE, just uses Defn
	to recompute it. Note: old value should be passed to CacheValue - this
	had always been NIL before.

[9 Sept 1980]

PrimSlot	 →	AnyPrimSlot	← RemoveVirtualSlots
VirtualSlot	 →	AnyComputableSlot  ← RemoveVirtualSlots
$SELF$Slot	 →	Any$SELF$Slot
Examples	 →	UnitExamples

13. Make unit initialization faster 
	- cache slots, ... on inheritance.

0) Now (4 July) doing:
	AnyUser - see #5

0.5) ReadOnly Mode -- set UP.BUMP? to NIL 
	LOGOUT's advise - to see if any put units since last SYSOUT, or
	OpenNetwork (if UF.NETWORKS non-NIL)
  [When logging out, ask user -- even if ReadOnly...?]
 Store who has used this core image.

2) UnionDT, and IntersectDT - need to deal with cases when types are
	different (eg FunctionType & SlotType [transform SlotType into
	(FunctionType (?DomainType? UnitType...))

5) AnyUser, in RLL. - here we store which KBs this user will want. In START,
	single question: "Your usual?". If Y, these loaded in.
	Else gets list, with questions. (May decide these are to be his default, or
	not.) Also, his "profile" indicates answers to the questions.
	Store with each KB whether or not it was Disconnected (and from whom.)
	If not, why even ask to reconnect?
  When he creates a new KB, this added to his list.

[4 July 1980]
ActionPartOfRule →	AnyActionPartOfRule
IfPartOfRule	 →	AnyIfPartOfRule
ThenPartOfRule	 →	AnyThenPartOfRule

1. Fix EDITU so second arg given to PutValue -- so may verify or not...

2. (QUOTE?# '(LAMBDA (*1) (PROG ?1 *2))
	    '((G0035)) 
	    '((unit slot) 
		((* this list is bound to *2) (UA-MAPSLOTS unit 'WRITELNTTY))))
  returns
   (LAMBDA (unit slot) 
	(PROG (G0035) 
	      (* this list is bound to *2)
	      (UA-MAPSLOTS unit 'WRITELNTTY)))
	That is, QUOTE?1 takes three arguments:
	#1: a list, in which substitutions will be made,
	#2: a list, whose i-th element is the value for ?i [here ?1 is (G0035)]
	#3: a list, whose i-th element is the value for *i [here *1 is (unit slot)]

[8 May 1980]
1. Ramifications of Altering a slot's value -- eg
	(i) IF x.S* is changed, THEN ∀ y ε x.(S-1)*, y.S* is invalid
	    [IF S = T ∪ V, & something is added to x.T
		THEN x.S should have that value aded as well - if format is ...]
	(ii) IF OrderedX is built from X by some ordering - ie is redundant-but
		ordered of X - then when U.X is modified by Adding, or Renaming,
		X should be removed from U.SlotsNowOrdered.

5. DomainType, RangeType
	ValuesInvalidated - defined from HighLevel, as should Format, Datatypes

    1) Make sure VerifyAll is doing the correct thing. Also pass unit and slot name
    	to it. (Fix it up for rest of ValueFormats.)
    	Delete now worthless FnForVerifyingAll and -- List.
*   2) MyKB is AnyUnitFunction - make it so.
    5) Args to HLDefnParser should be (name (RangeType) ...) 
    	(note: delete HLVerify - now RangeType.)
    Define DomainTpe, RangeType
    	[Note: need only FnForAdding - 1, List, 1st - come from why part.

 Units renamed.
FnForRenaming1	 →	FnForSubstituting1
ToRenameValue	 →	ToSubstValue	← ↓
[DefaultRenameValue → DefaultSubstValue - this a function]
SubSetDT	 →	SubDT
SuperSetDT	 →	SuperDT
SlotsNowOrdered	 →	MySlotsNowOrdered
EssentialVirtualSlots	 →	MyEssentialVirtualSlots
DependantNetworks →	DependentNetworks  ← GetKBs
ISpecs		 →	ISubClass
PossibleSlotsOfISpecs →	PossibleSlotsOfISubClass
ActionType	 →	FunctionType

 Fix HLDefn.Defn (or ToInit..) - SortSlots => PutInOrder
 CreateSlot - descends from VirtualSlot, not AnySlot
 Fn for computing ToParseParts-like thing, so TPP can be eliminated
 Format & Datatype - should descend from RangeType, softly (not FunctionSpec)
 Names selected - need loops 
	λ(x) (McDo .. (NOT (Unitp (RPLACA (SETQ ...(EXPLODE (GETSYM))  
	[in CreateU4S,CreateSlot. ...]
 Ask user if he wishes to create a new slot - 
	[do we want to merge all things invalidated into one? 
	[  No! Later we might want to do other things, than just invalidate]
	If not, just pass HLDefnParser( highleveldefn ) along - use GetGetVal,
	and the like...
	 - so either PSUEDO-slot or REAL-slot
 If the "why" to the Invalidate function included "DoInverses", pass this along to
	AfterPutValue, so it will actually remove this and that!